from rest_framework.serializers import ModelSerializer

from stock.serializer import GoodsSerializer
from .models import *



class IndentSerializer(ModelSerializer):
    class Meta:
        model = Indent
        fields = '__all__'

class IndentHistorySerializer(ModelSerializer):
    class Meta:
        model = IndentHistory
        fields = '__all__'


class IndentDetailSerializer(ModelSerializer):
    goods = GoodsSerializer(many=False)
    indent = IndentSerializer(many=False)
    class Meta:
        model = IndentDetail
        fields = '__all__'